using System;
using System.Runtime.InteropServices;

namespace Leap
{
	public class CircleGesture : Gesture
	{
		private HandleRef swigCPtr;

		public Vector Center
		{
			get
			{
				IntPtr intPtr = LeapPINVOKE.CircleGesture_Center_get(swigCPtr);
				return (intPtr == IntPtr.Zero) ? null : new Vector(intPtr, true);
			}
		}

		public Vector Normal
		{
			get
			{
				IntPtr intPtr = LeapPINVOKE.CircleGesture_Normal_get(swigCPtr);
				return (intPtr == IntPtr.Zero) ? null : new Vector(intPtr, true);
			}
		}

		public float Progress => LeapPINVOKE.CircleGesture_Progress_get(swigCPtr);

		public float Radius => LeapPINVOKE.CircleGesture_Radius_get(swigCPtr);

		public Pointable Pointable
		{
			get
			{
				IntPtr intPtr = LeapPINVOKE.CircleGesture_Pointable_get(swigCPtr);
				return (intPtr == IntPtr.Zero) ? null : new Pointable(intPtr, true);
			}
		}

		public CircleGesture(IntPtr cPtr, bool cMemoryOwn)
			: base(LeapPINVOKE.CircleGesture_SWIGUpcast(cPtr), cMemoryOwn)
		{
			swigCPtr = new HandleRef(this, cPtr);
		}

		public static HandleRef getCPtr(CircleGesture obj)
		{
			return obj?.swigCPtr ?? new HandleRef(null, IntPtr.Zero);
		}

		~CircleGesture()
		{
			Dispose();
		}

		public override void Dispose()
		{
			lock (this)
			{
				if (swigCPtr.Handle != IntPtr.Zero)
				{
					if (base.swigCMemOwn)
					{
						base.swigCMemOwn = false;
						LeapPINVOKE.delete_CircleGesture(swigCPtr);
					}
					swigCPtr = new HandleRef(null, IntPtr.Zero);
				}
				GC.SuppressFinalize(this);
				base.Dispose();
			}
		}

		public static GestureType ClassType()
		{
			return (GestureType)LeapPINVOKE.CircleGesture_ClassType();
		}

		public CircleGesture()
			: this(LeapPINVOKE.new_CircleGesture__SWIG_0(), true)
		{
		}

		public CircleGesture(Gesture rhs)
			: this(LeapPINVOKE.new_CircleGesture__SWIG_1(Gesture.getCPtr(rhs)), true)
		{
			if (!LeapPINVOKE.SWIGPendingException.Pending)
			{
				return;
			}
			throw LeapPINVOKE.SWIGPendingException.Retrieve();
		}
	}
}
